import 'package:flutter/material.dart';
import 'package:flutter_juwo/common/common_index.dart';
import 'package:flutter_juwo/ui/custom/real_rich_text.dart';
import 'package:flutter_juwo/ui/utils/utils.dart';

///************************
/// @auther nb
/// @function 头部信息
/// @创建日期 2019/8/1 18:01
///************************
class Top extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: <Widget>[
          Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              Container(
                decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(5),
                    border: Border.all(
                        color: Color(0xFFe5e5e5),
                        width: ScreenUtil().setWidth(1))),
                margin: EdgeInsets.fromLTRB(ScreenUtil().setWidth(30),
                    ScreenUtil().setWidth(24), 0, ScreenUtil().setWidth(22)),
                width: ScreenUtil().setWidth(220),
                height: ScreenUtil().setWidth(220),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(5),
                  child: Image.asset(Utils.getImgPath("temp_goods1")),
                ),
              ),
              Container(
                padding: EdgeInsets.fromLTRB(ScreenUtil().setWidth(30),
                    ScreenUtil().setWidth(46), 0, ScreenUtil().setWidth(46)),
                height: ScreenUtil().setWidth(266),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    Container(
                      child: Text(
                        "商品名称：连衣裙女 修身",
                        style: TextStyles.custom(
                            28, Colours.appC1, Font.PingFangBlod),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
                      child: Text(
                        "店铺名称：艺***店",
                        style: TextStyles.custom(
                            24, Colours.appC1, Font.PingFangMedium),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: ScreenUtil().setWidth(12)),
                      child: Text(
                        "下单数量：1件",
                        style: TextStyles.custom(
                            24, Colours.appC1, Font.PingFangMedium),
                      ),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: ScreenUtil().setWidth(12)),
                      child: RealRichText([
                        TextSpan(
                            text: "成交价格：",
                            style: TextStyles.custom(24, Colours.appC1,
                                Font.PingFangMedium)),
                        TextSpan(
                            text: "298.66元",
                            style: TextStyles.custom(24, Colours.c2303128,
                                Font.PingFangMedium))
                      ]),
                    )
                  ],
                ),
              )
            ],
          ),
          Container(
            color: Color(0xFFffdedf),
            margin: EdgeInsets.fromLTRB(ScreenUtil().setWidth(30), 0,
                ScreenUtil().setWidth(30), ScreenUtil().setWidth(20)),
            padding: EdgeInsets.fromLTRB(
                ScreenUtil().setWidth(20),
                ScreenUtil().setWidth(15),
                ScreenUtil().setWidth(20),
                ScreenUtil().setWidth(15)),
            child: Text(
              "严禁通过淘宝客、店铺全称、商品价格直接搜索，一经发现，永久冻结账户",
              style: TextStyles.custom(
                  24, Color(0xFFdf3033), Font.PingFangMedium),
            ),
          )
        ],
      ),
    );
  }
}
